<html>
<style>
    .div1 {
        background-color: aquamarine;
    }

    .div2 {
        display: block;
        width: 100px;
        margin: auto;
        background-color: blanchedalmond;
    }

    .div3 {
        /* display: flex; */
    }
</style>

<body>
    <div class="div3">
        <div>
            <div class="div1">
                <span class="div2">123</span>
            </div>
        </div>
        <div class="div1">
            <div class="div2">123</div>
        </div>
    </div>
</body>

</html>